
import { notification } from 'ant-design-vue';
/**
 * 提示的封装函数-- 高阶写法
 * @param {*} type 
 */
export const useNotice = type => ({
    message,
    description,
    duration = 1
}) => {
    notification[type]({
        message,
        description,
        duration
    })
}

export const useSuccessNotice=useNotice('success')
export const useWarningNotice=useNotice('warning')
export const useErrorNotice=useNotice('error')
export const useInfoNotice=useNotice('info')
